package com.zhc.sandbox;

/**
 * @author zj
 * @description 沙箱执行结果
 * @date 2024/6/12 07:57
 **/
public class Result {
    // 程序消耗的cpu时间 ms
    private long cpuTime;
    // 程序消耗的真实时间 ms
    private long realTime;
    // 程序消耗的内存
    private long memory;
    // 中断信号
    private int signal;
    // 退出代码
    private int exitCode;
    // 程序执行输出
    private int result;
    private String output;

    public String getOutput() {
        return output;
    }

    public void setOutput(String output) {
        this.output = output;
    }

    public long getCpuTime() {
        return cpuTime;
    }

    public void setCpuTime(long cpuTime) {
        this.cpuTime = cpuTime;
    }

    public long getRealTime() {
        return realTime;
    }

    public void setRealTime(long realTime) {
        this.realTime = realTime;
    }

    public long getMemory() {
        return memory;
    }

    public void setMemory(long memory) {
        this.memory = memory;
    }

    public int getSignal() {
        return signal;
    }

    public void setSignal(int signal) {
        this.signal = signal;
    }

    public int getExitCode() {
        return exitCode;
    }

    public void setExitCode(int exitCode) {
        this.exitCode = exitCode;
    }

    public int getResult() {
        return result;
    }

    public void setResult(int result) {
        this.result = result;
    }

    @Override
    public String toString() {
        return "Result{" +
                "cpuTime=" + cpuTime +
                ", realTime=" + realTime +
                ", memory=" + memory +
                ", signal=" + signal +
                ", exitCode=" + exitCode +
                ", result=" + result +
                ", output='" + output + '\'' +
                '}';
    }
}
